<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

        <!-- Sidebar user panel (optional) -->
        <div class="user-panel">
            <div class="pull-left image">
                <!--<img src="/img/avatar.png" class="img-circle" alt="User Image">-->
                <i class="fa fa-user-circle-o" aria-hidden="true"></i>
            </div>
            <div class="pull-left info">
                <p>@if(\Auth::user()){{\Auth::user()->real_name}}  @endif</p>
                <!-- Status -->
                <a href="{{route('admin.logout')}}"><i class="fa fa-circle text-danger"></i> 退出系统</a>
            </div>
        </div>

        <!-- 左边搜索框-->
        <!--<form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
                    <span class="input-group-btn">
              <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
              </button>
            </span>
            </div>
        </form>-->
        <!-- /.search form -->

        <!-- Sidebar Menu -->
        <ul class="sidebar-menu" data-widget="tree">

            <!-- Optionally, you can add icons to the links -->
            <li class="{{setActive('admin.index')}}"><a href="{{route('admin.index')}}"><i class="fa fa-dashboard"></i> <span>控制台</span></a></li>
            @permission('ogz-index')
            <li class="{{setActive('admin.ogz.index')}}"><a href="{{route('admin.ogz.index')}}"><i class="fa fa-sitemap"></i> <span>组织机构</span></a></li>
            @endauth
            @permission('qyapp-index')
            <li class="{{setActive('qyapp.index')}}"><a href="{{route('qyapp.index')}}"><i class="fa fa-cogs"></i> <span>企业应用</span></a></li>
            @endauth
{{--            <li><a href="#"><i class="fa fa-exchange"></i> <span>兑换中心</span></a></li>--}}

            @needspermissions('cate-index;level-index;vuls-index;chartsanalysis-index;chartsanalysis-subblock;chartsanalysis-company',false)
            <li class="treeview {{setActive(['admin.flaw.vulsadd','admin.flaw.vulslist','admin.flaw.levellist','admin.flaw.index','admin.flaw.chartsanalysis'])}}">
                <a href="{{route('admin.flaw.vulslist')}}"><i class="fa fa-shield"></i> <span>漏洞管理</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    @permission('vuls-index')
                    <li class="{{setActive('admin.flaw.vulslist')}}"><a href="{{route('admin.flaw.vulslist')}}"><i class="fa fa-bug" aria-hidden="true"></i>漏洞列表</a></li>
                    @endauth
                    <!--<li class="{{setActive('#')}}"><a href="#"><i class="fa fa-file" aria-hidden="true"></i>漏洞分析</a></li>-->
                    @permission('level-index')
                    <li class="{{setActive('admin.flaw.levellist')}}"><a href="{{route('admin.flaw.levellist')}}"><i class="fa fa-line-chart" aria-hidden="true"></i>等级评分</a></li>
                    @endauth
                    @permission('cate-index')
                    <li class="{{setActive('admin.flaw.index')}}"><a href="{{route('admin.flaw.index') }}"><i class="fa fa-object-group" aria-hidden="true"></i>漏洞分类</a></li>
                    @endauth
                    @needspermissions('chartsanalysis-index;chartsanalysis-subblock;chartsanalysis-company',false)
                    <li class="{{setActive('admin.flaw.chartsanalysis')}}"><a href="
                  @if(access()->allow('chartsanalysis-index'))
                    {{route('admin.flaw.chartsanalysis') }}
                    @elseif(access()->allow('chartsanalysis-subblock'))
                    {{route('admin.flaw.subblock') }}
                    @else(access()->allow('chartsanalysis-company'))
                    {{route('admin.flaw.company') }}
                    @endif
"><i class="fa fa-area-chart" aria-hidden="true"></i>图表分析</a></li>
                    @endauth
                    @permission('vuls-add')
                    <li class="{{setActive('admin.flaw.vulsadd')}}"><a href="{{ URL::route('admin.flaw.vulsadd') }}"><i class="fa fa-plus-square" aria-hidden="true"></i>提交漏洞</a></li>
                    @endauth
                </ul>
            </li>
            @endauth
            {{--项目管理--}}
            @needspermissions('projectmanage-index',false)
            <li class="treeview">
                <a href="#"><i class="fa fa-tasks"></i> <span>项目管理</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">

                    <li><a href="{{route('admin.projectmanage.index')}}"><i class="fa fa-list" aria-hidden="true"></i>项目列表</a></li>
                    {{--<li><a href="{{route('admin.checkoption.index')}}"><i class="fa fa-check" aria-hidden="true"></i>测试项</a></li>--}}
                </ul>
            </li>
            @endauth

            @needspermissions('user-index;role-index',false)
            <li class="treeview {{setActive(['admin.access.user.index','admin.access.role.index','admin.access.permission.index'])}}">
                <a href="{{route('admin.access.user.index')}}"><i class="fa fa-user-secret"></i> <span>权限管理</span>

                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    @permission('user-index')
                    <li class="{{setActive('admin.access.user.index')}}"><a href="{{route('admin.access.user.index')}}"><i class="fa fa-user" aria-hidden="true"></i>用户管理</a></li>
                    @endauth
                    @permission('role-index')
                    <li class="{{setActive('admin.access.role.index')}}"><a href="{{route('admin.access.role.index')}}"><i class="fa fa-users" aria-hidden="true"></i>角色管理</a></li>
                    @endauth
                    @permission('permission-index')
                    <li class="{{setActive('admin.access.permission.index')}}"><a href="{{route('admin.access.permission.index')}}"><i class="fa fa-list" aria-hidden="true"></i>节点管理</a></li>
                    @endauth
                </ul>
            </li>
            @endauth
            {{--安全知识库--}}
            <li class="treeview">
                <a href="#"><i class="fa fa-file-text"></i> <span>安全知识库</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">

                    <li><a href="{{route('knowledge.index')}}"><i class="fa fa-list" aria-hidden="true"></i>知识列表</a></li>
                    {{--需要配置权限--}}
                    @permission('knowledge-add')
                    <li><a href="{{route('knowledge.create')}}"><i class="fa fa-plus-square" aria-hidden="true"></i>新建知识</a></li>
                    @endauth
                </ul>
            </li>
            @needspermissions('log-index',false)
            <li class="treeview {{setActive('admin.log.index')}}">
                <a href="#"><i class="fa fa-file"></i> <span>日志管理</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li class="{{setActive('admin.log.index')}}"><a href="{{route('admin.log.index') }}"><i class="fa fa-file" aria-hidden="true"></i>日志列表</a></li>
                </ul>
            </li>
            @endauth
            @needspermissions('goods-index;goodscate-index',false)
            <li class="treeview {{setActive(['admin.goods.goodslist','admin.goods.goodscatelist'])}}">
                <a href="#"><i class="fa fa-shopping-cart"></i> <span>商品管理</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li class="{{setActive('admin.goods.goodslist')}}"><a href="{{route('admin.goods.goodslist') }}"><i class="fa fa-list" aria-hidden="true"></i>商品列表</a></li>
                    <li class="{{setActive('admin.goods.goodscatelist')}}"><a href="{{route('admin.goods.goodscatelist') }}"><i class="fa fa-object-group" aria-hidden="true"></i>商品分类</a></li>

                </ul>
            </li>
            @endauth
            @needspermissions('order-index',false)
            <li class="treeview {{setActive('admin.order.orderlist')}}">
                <a href="#"><i class="fa fa-exchange"></i> <span>兑换记录</span>
                        <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li class="{{setActive('admin.order.orderlist')}}"><a href="{{route('admin.order.orderlist') }}"><i class="fa fa-list" aria-hidden="true"></i>兑换列表</a></li>
                </ul>
            </li>
            @endauth
            @needspermissions('announce-index',false)
            <li class="treeview">
                <a href="#"><i class="fa fa-comments"></i> <span>公告管理</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="{{route('admin.announce.index') }}"><i class="fa fa-list" aria-hidden="true"></i>公告列表</a></li>
                    <li><a href="{{route('admin.announce.new') }}"><i class="fa fa-plus-square" aria-hidden="true"></i>新增公告</a></li>
                </ul>
            </li>
            @endauth

            {{--分发的漏洞--}}

            <li class="treeview">
                <a href="#"><i class="fa fa-bug"></i> <span>我的漏洞</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">
                    @needspermissions('distribute-distribute',false)
                    <li><a href="{{route('admin.distribute.index') }}"><i class="fa fa-user" aria-hidden="true"></i>我分发的</a></li>
                    @endauth
                    <li><a href="{{route('admin.distribute.recived') }}"><i class="fa fa-user-circle" aria-hidden="true"></i>分发给我的</a></li>
                </ul>
            </li>
            @permission('sysconfig-index')
            <li class="{{setActive('admin.config.index')}}"><a href="{{route('admin.config.index')}}"><i class="fa fa-cog fa-fw"></i> <span>系统设置</span></a></li>
            @endauth
            <li class="treeview">
                <a href="#"><i class="fa fa-book"></i> <span>使用手册</span>
                    <span class="pull-right-container">
                <i class="fa fa-angle-left pull-right"></i>
              </span>
                </a>
                <ul class="treeview-menu">

                    <li><a href="http://src.hnatech.com/docs/"><i class="fa fa-bookmark" aria-hidden="true"></i>使用手册</a></li>

                </ul>
            </li>

        </ul>
    </section>
    <!-- /.sidebar -->
</aside>